package a66weding.com.jiehuntong.adapter;

import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.andview.refreshview.recyclerview.BaseRecyclerAdapter;

import a66weding.com.jiehuntong.R;
import a66weding.com.jiehuntong.widgets.CircularImage;

/**
 * Created by admin on 2016/7/7.
 */
public class MyProgressAdapter extends BaseRecyclerAdapter<MyProgressAdapter.ViewHolder> {

    private Context context;
    public MyProgressAdapter(Context context){
        this.context = context;
    }

    @Override
    public ViewHolder getViewHolder(View view) {

        return new ViewHolder(view);
    }

    @Override
    public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType, boolean isItem) {
        View v = LayoutInflater.from(context).inflate(
                R.layout.diy_item_progress, parent, false);
        ViewHolder holder = new ViewHolder(v);
        return holder;
    }

    @Override
    public void onBindViewHolder(ViewHolder holder, int position, boolean isItem) {

    }

    @Override
    public int getAdapterItemCount() {
        return 6;
    }

    public class ViewHolder extends RecyclerView.ViewHolder{
        //头像
        private CircularImage head;
        private TextView  name;
        private TextView  data;
        private TextView location;
        //进度;
        private TextView  schedule;
        public ViewHolder(View itemView) {
            super(itemView);

            head = (CircularImage) itemView.findViewById(R.id.diyprogress_roundimage);
            name = (TextView) itemView.findViewById(R.id.progress_item_tv_name);
            data = (TextView) itemView.findViewById(R.id.progress_item_tv_date);
            schedule = (TextView) itemView.findViewById(R.id.progress_item_tv_stutas);
            location = (TextView) itemView.findViewById(R.id.progress_item_tv_place);
        }


    }
}
